<template>
  <el-tabs v-model="activeName" type="card" class="bColorT">
    <el-tab-pane v-for="tab in tabs" :key="tab.name" :label="tab.label" :name="tab.name">
      <component :is="tab.name" />
    </el-tab-pane>
  </el-tabs>
</template>

<script>
import { Carousel, Teacher } from './list';

export default {
  name: 'IndexForm',
  components: {
    Carousel,
    Teacher
  },
  data () {
    return {
      activeName: 'Carousel',
      tabs: [
        {
          label: '推广图',
          name: 'Carousel'
        },
        {
          label: '名师',
          name: 'Teacher'
        }
      ]
    };
  },
  created () {
    // this.activeName = this.$route.query && this.$route.query.tabsName ? this.$route.query.tabsName : this.tabs[0].name;
  }
};
</script>

<style lang="scss" scoped></style>
